'''
Author: xialang333@gmail.com
Date: 2024-07-26 11:37:57
LastEditTime: 2024-07-26 12:07:35
'''
from rest_framework import serializers
from utils.viewset import CustomModelViewSet
from utils.serializers import CustomModelSerializer
from utils.jsonResponse import DetailResponse, ErrorResponse

from apps.software.models import FilesModel


class FilesSerializer(CustomModelSerializer):
    class Meta:
        model = FilesModel
        fields = "__all__"


class FileViewSet(CustomModelViewSet):
    queryset = FilesModel.objects.all()
    serializer_class = FilesSerializer
    search_fields = ('id', 'name')